package com.zf.shuashua.advert

import com.meis.base.mei.base.BaseActivity
import com.meis.base.mei.utils.Eyes
import com.zf.shuashua.R

class H5Activity : BaseActivity() {

    var loadUrl = ""

    override fun initView() {
        Eyes.translucentStatusBar(this, true)
    }

    override fun initData() {
        loadUrl = try {
            intent.getStringExtra(LOAD_URL)?:"http://www.baidu.com"
        } catch (e: Exception) {
            "http://www.baidu.com"
        }
        if (findFragment(H5Fragment::class.java) == null) {
            loadRootFragment(R.id.fl_container, H5Fragment.getInstance(loadUrl))  //load root Fragment2
        }
    }

    override fun getLayoutId(): Int {
        return R.layout.comm_transparent_fl
    }

    companion object {
        @kotlin.jvm.JvmField
        var LOAD_URL = "load_url"
    }

}